package com.qingke.note.pojo;

import java.util.Date;

public class Note {
    private Integer id;

    private String title;

    private String content;

    private Date time;

    private Date createtime;

    private Integer userId;

    private Integer statusId;

    private Integer labelId;

    private User user;
    
    private Status status;
    
    private Label label;
    
    private String effective;
   	
    @Override
	public String toString() {
    	boolean hasLable = "Y".equals(label.getEffective());//判断该条标签是否处于有效状态
    	
    	String lab = hasLable?label.toString():"空";//有效则输出标签内容，无效则输出一个空字
    	
    	String str = "【标题：" + title + ", 内容：" + content + ", 提醒时间：" + time + ", 标签： " + lab + 
				", \n\t创建时间:" + createtime +  ", 备忘状态：" + status  + "】";
		return str;
	}
	
	public String getEffective() {
		return effective;
	}



	public void setEffective(String effective) {
		this.effective = effective;
	}



	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Status getStatus() {
		return status;
	}

	public void setStatus(Status status) {
		this.status = status;
	}

	public Label getLabel() {
		return label;
	}

	public void setLabel(Label label) {
		this.label = label;
	}

	public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title == null ? null : title.trim();
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content == null ? null : content.trim();
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getStatusId() {
        return statusId;
    }

    public void setStatusId(Integer statusId) {
        this.statusId = statusId;
    }

    public Integer getLabelId() {
        return labelId;
    }

    public void setLabelId(Integer labelId) {
        this.labelId = labelId;
    }
}